#pragma once
#include <setjmp.h>
#include <stdio.h>
#include "pnglib.h"
#ifdef __cplusplus
#define export extern "C" __declspec (dllexport)
#else
#define export __declspec (dllexport)
#endif

struct png_buffer
{
	unsigned char * pBuffer;
	unsigned int dwBufferSize;
	unsigned char * pCurr;
};

struct png_image_info
{
	png_image_info()
	{
		dwWidth = 0;
		dwHeight = 0;
		dwColorNum = 0;
		dwByteNum = 0;
	}
	unsigned int dwWidth;
	unsigned int dwHeight;
	unsigned int dwColorNum;
	unsigned int dwByteNum;
};


bool __declspec (dllexport) is_png_data(unsigned char * pBuffer,unsigned int dwBufferSize);

void __declspec (dllexport) png_create(unsigned char * pBuffer,unsigned int dwBufferSize,unsigned char ** ppOut, png_image_info * pInfo);

